<?php

namespace BaseBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * User
 *
 * @ORM\Table(name="user", options={"comment":"用户表"})
 * @ORM\Entity()
 */
class User
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var string
     *
     * @ORM\Column(name="uid", type="string",  unique=true, options={"comment":"用户编号"})
     */
    private $Uid;

    /**
     * @var User
     *
     * @ORM\ManyToOne(targetEntity="BaseBundle\Entity\User", inversedBy="id")
     * @ORM\JoinColumn(name="parent_id", referencedColumnName="id")
     * @ORM\Column(options={"comment":"父级用户id"}, name="parent_id", nullable=true)
     */
    private $parent_id;

    /**
     * @var string
     *
     * @ORM\Column(name="name", type="text",  nullable=true, options={"comment":"昵称"})
     */
    private $name;

    /**
     * @var string
     *
     * @ORM\Column(name="wx_open_id", type="string", length=45,  options={"comment"="wx open_id"})
     */
    private $wx_open_id;

    /**
     * @var string
     *
     * @ORM\Column(name="wx_number", type="string", length=45, nullable=true, options={"comment"="wx号"})
     */
    private $wx_number;
    
    /**
     * @var string
     *
     * @ORM\Column(name="avatar", type="string", length=255, nullable=true, options={"comment"="头像"})
     */
    private $avatar;

    /**
     * @var string
     *
     * @ORM\Column(name="balance", type="decimal", precision=10, scale=2, options={"comment"="分销红利余额(提现)", "default"="0.00"})
     */
    private $balance;

    /**
     * @var string
     *
     * @ORM\Column(name="monetary", type="decimal", precision=10, scale=2, options={"comment"="消费金额", "default"="0.00"})
     */
    private $monetary;

    /**
     * @var string
     *
     * @ORM\Column(name="squad_money", type="decimal", precision=10, scale=2, options={"comment"="累计奖励金额", "default"="0.00"})
     */
    private $squad_money;

    /**
     * @var boolean
     *
     * @ORM\Column(name="status", type="boolean", nullable=true, options={"default":1, "comment":"状态位: 0禁用 1正常"})
     */
    private $status;
    
    /**
     * @var \DateTime
     *
     * @ORM\Column(name="created_at", type="datetime", options={"comment":"创建时间"})
     */
    private $createdAt;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="updated_at", type="datetime", nullable=true, options={"comment":"更新时间"})
     */
    private $updatedAt;

    /**
     * @var boolean
     *
     * @ORM\Column(name="is_agent", type="boolean", nullable=true, options={"comment":"是否代理", "default":0})
     */
    private $is_agent;

    /**
     * @var string
     *
     * @ORM\Column(name="information_tag", type="string", length=45, nullable=true, options={"comment":"消息标识位-用于推送消息建立聊天"})
     */
    private $information_tag;
}
